package strcy.cn.market.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import strcy.cn.market.pojo.OrderDetails;
import strcy.cn.market.pojo.VO.OrderDetailsVO;

import java.util.List;

@Mapper
public interface OrderDetailsMapper {
    //创建订单详情
    @Insert("insert into order_details(order_id, product_id, quantity, price) " +
            "value(#{orderId},#{productId},#{quantity},#{price})")
    void add(OrderDetails orderDetails);
    //根据订单ID获取订单详情列表
    List<OrderDetailsVO> list(String orderId);
}
